import classNames from 'classnames'
import React, { useState } from 'react'
import styles from './index.module.less'

interface ISvgIconProps {
  name?: string
  color?: string
  size?: string
}

const SvgIcon: React.FC<ISvgIconProps> = props => {
  return (
    <svg
      aria-hidden
      className={classNames([styles.svg_icon, `icon-${props.name}`])}
      style={{ width: props.size, height: props.size, color: `${props.color}` }}
    >
      <use xlinkHref={`#icon-${props.name}`}></use>
    </svg>
  )
}

export default SvgIcon
